package com.niiwoo.civet.mobile.vo.request.invest;

import java.math.BigDecimal;
import java.util.List;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;

import com.niiwoo.civet.mobile.vo.common.LinkageConfig.PeriodValue;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
@ApiModel("批量投资请求")
public class BatchInvestRequestVO {

	@ApiModelProperty(value = "选中的标的类型")
	@NotEmpty(message = "标的类型不能为空")
	private List<Integer> productTypes;
	@ApiModelProperty("选中的期限")
	@NotEmpty(message = "期限不能为空")
	private List<PeriodValue> periodTypes;
	@ApiModelProperty("选中的还款方式")
	@NotEmpty(message = "还款方式不能为空")
	private List<Integer> repaymentTypes;
	@ApiModelProperty("选中的利率")
	@NotEmpty(message = "利率不能为空")
	private List<BigDecimal> ratetTypes;

	@ApiModelProperty(value = "单笔投资上限金额", required = true)
	@NotNull(message = "singleMaxInvestAmount不能为空")
	@Range(min = 100, max = 100000, message = "100 <= singleMaxInvestAmount <= 100000")
	private BigDecimal singleMaxInvestAmount;

	@ApiModelProperty(value = "账户保留最低余额", required = true)
	@NotNull(message = "minKeepBalance不能为空")
	@Min(value = 0, message = "minKeepBalance最低为0")
	private BigDecimal minKeepBalance;

	@ApiModelProperty(value = "是否自动使用红包,0=不使用;1=使用;", required = true)
	@NotNull(message = "autoUsePrize为空")
	private Byte autoUsePrize;

	@ApiModelProperty(value = "是否必须使用红包,0=不使用，1=使用(需要先判断isAutoUsePrize是否为1)", required = true)
	@NotNull(message = "mustUsePrize为空")
	private Byte mustUsePrize;

	@ApiModelProperty(value = "使用加息券最低投资金额", required = true)
	@NotNull(message = "useCouponMinInvestAmount为空")
	private BigDecimal useCouponMinInvestAmount;

	@ApiModelProperty("批量投资的条件是否同步到自动投资：0:-不同步，1-同步")
	@NotNull(message = "syncToAutoInvest不能为空")
	private Byte syncToAutoInvest;

}
